<!DOCTYPE html>





<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 3.9.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.ico?v=7.4.0">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.ico?v=7.4.0">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.ico?v=7.4.0">
  <link rel="mask-icon" href="/images/logo.svg?v=7.4.0" color="#222">

<link rel="stylesheet" href="/css/main.css?v=7.4.0">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css?v=4.7.0">


<script id="hexo-configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '7.4.0',
    exturl: false,
    sidebar: {"position":"left","display":"post","offset":12,"onmobile":false,"dimmer":false},
    copycode: {"enable":false,"show_result":false,"style":null},
    back2top: {"enable":true,"sidebar":false,"scrollpercent":false},
    bookmark: {"enable":false,"color":"#222","save":"auto"},
    fancybox: false,
    mediumzoom: false,
    lazyload: false,
    pangu: false,
    algolia: {
      appID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    },
    localsearch: {"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},
    path: 'search.json',
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    translation: {
      copy_button: '复制',
      copy_success: '复制成功',
      copy_failure: '复制失败'
    },
    sidebarPadding: 40
  };
</script>

  <meta name="description" content="编译平台准备工作: 下载arm-none-linux-gnueabi-gcc  下载transmission-2.94  新建ARM文件夹  解压arm-none-linux-gnueabi-gcc和transmission-2.94到ARM文件夹  设置编译平台环境变量 123export PATH=&quot;/root/ARM/external-toolchain/bin:$PATH&quot;export c">
<meta name="keywords" content="linux,arm,transmission,bt">
<meta property="og:type" content="article">
<meta property="og:title" content="交叉编译arm-transmission-2.94">
<meta property="og:url" content="https://unix2dos.github.io/p/73da9612.html">
<meta property="og:site_name" content="Levon&#39;s Blog">
<meta property="og:description" content="编译平台准备工作: 下载arm-none-linux-gnueabi-gcc  下载transmission-2.94  新建ARM文件夹  解压arm-none-linux-gnueabi-gcc和transmission-2.94到ARM文件夹  设置编译平台环境变量 123export PATH=&quot;/root/ARM/external-toolchain/bin:$PATH&quot;export c">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2019-09-27T15:36:51.211Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="交叉编译arm-transmission-2.94">
<meta name="twitter:description" content="编译平台准备工作: 下载arm-none-linux-gnueabi-gcc  下载transmission-2.94  新建ARM文件夹  解压arm-none-linux-gnueabi-gcc和transmission-2.94到ARM文件夹  设置编译平台环境变量 123export PATH=&quot;/root/ARM/external-toolchain/bin:$PATH&quot;export c">
  <link rel="canonical" href="https://unix2dos.github.io/p/73da9612">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome: false,
    isPost: true,
    isPage: false,
    isArchive: false
  };
</script>

  <title>交叉编译arm-transmission-2.94 | Levon's Blog</title>
  








  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .logo,
  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">
  <div class="container use-motion">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-meta">

    <div>
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">Levon's Blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
        <h1 class="site-subtitle" itemprop="description">微信:  L6241425</h1>
      
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>


<nav class="site-nav">
  
  <ul id="menu" class="menu">
      
      
      
        
        <li class="menu-item menu-item-home">
      
    

    <a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-archives">
      
    

    <a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i> <br>时光</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-categories">
      
    

    <a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类</a>

  </li>
      
      
      
        
        <li class="menu-item menu-item-tags">
      
    

    <a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>

  </li>
      <li class="menu-item menu-item-search">
        <a href="javascript:;" class="popup-trigger">
        
          <i class="menu-item-icon fa fa-search fa-fw"></i> <br>搜索</a>
      </li>
    
  </ul>

</nav>
  <div class="site-search">
    <div class="popup search-popup">
    <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocorrect="off" autocapitalize="none"
           placeholder="搜索..." spellcheck="false"
           type="text" id="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result"></div>

</div>
<div class="search-pop-overlay"></div>

  </div>
</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
            

          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
      <article itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block post">
    <link itemprop="mainEntityOfPage" href="https://unix2dos.github.io/p/73da9612.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Levon">
      <meta itemprop="description" content="Never Give Up">
      <meta itemprop="image" content="/images/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Levon's Blog">
    </span>
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">交叉编译arm-transmission-2.94

          
        </h2>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              
                
              

              <time title="创建时间：2018-10-08 17:02:00" itemprop="dateCreated datePublished" datetime="2018-10-08T17:02:00+08:00">2018-10-08</time>
            </span>
          
            

            
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2019-09-27 23:36:51" itemprop="dateModified" datetime="2019-09-27T23:36:51+08:00">2019-09-27</time>
              </span>
            
          
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/3-计算机系统/" itemprop="url" rel="index"><span itemprop="name">3-计算机系统</span></a></span>

                
                
                  ，
                
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/3-计算机系统/BitTorrent/" itemprop="url" rel="index"><span itemprop="name">BitTorrent</span></a></span>

                
                
              
            </span>
          

          
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
        
      
      <span class="post-meta-item-text">Disqus：</span>
    
    <a title="disqus" href="/p/73da9612.html#comments" itemprop="discussionUrl"><span class="post-comments-count disqus-comment-count" data-disqus-identifier="p/73da9612.html" itemprop="commentCount"></span></a>
  </span>
  
  
          <br>
            <span class="post-meta-item" title="本文字数">
              <span class="post-meta-item-icon">
                <i class="fa fa-file-word-o"></i>
              </span>
              
                <span class="post-meta-item-text">本文字数：</span>
              
              <span>5.1k</span>
            </span>
          
            <span class="post-meta-item" title="阅读时长">
              <span class="post-meta-item-icon">
                <i class="fa fa-clock-o"></i>
              </span>
              
                <span class="post-meta-item-text">阅读时长 &asymp;</span>
              
              <span>5 分钟</span>
            </span>
          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h3 id="编译平台准备工作"><a href="#编译平台准备工作" class="headerlink" title="编译平台准备工作:"></a>编译平台准备工作:</h3><ol>
<li><p>下载arm-none-linux-gnueabi-gcc</p>
</li>
<li><p>下载transmission-2.94</p>
</li>
<li><p>新建ARM文件夹</p>
</li>
<li><p>解压arm-none-linux-gnueabi-gcc和transmission-2.94到ARM文件夹</p>
</li>
<li><p>设置编译平台环境变量</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">export PATH="/root/ARM/external-toolchain/bin:$PATH"</span><br><span class="line">export cross=arm-none-linux-gnueabi-</span><br><span class="line">export CC="$&#123;cross&#125;gcc"</span><br></pre></td></tr></table></figure>
</li>
<li><p>编译的时候一定要注意看log, 是arm-none-linux-gnueabi-gcc编译的才是正确的</p>
</li>
</ol>
<a id="more"></a>



<h3 id="目标平台开始编译"><a href="#目标平台开始编译" class="headerlink" title="目标平台开始编译:"></a>目标平台开始编译:</h3><h4 id="1-transmission"><a href="#1-transmission" class="headerlink" title="1. transmission"></a>1. transmission</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">./configure --host="arm-none-linux-gnueabi" --prefix=/usr/local --without-gtk --without-systemd_daemon  --disable-mac --enable-utp --disable-nls  --enable-utp --enable-lightweight --disable-cli --enable-daemon  PKG_CONFIG="/usr/bin/pkg-config" PKG_CONFIG_PATH="/root/ARM/opt/lib/pkgconfig"</span><br><span class="line"></span><br><span class="line">make CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib" LD="$&#123;cross&#125;ld"</span><br><span class="line">make install DESTDIR=/root/ARM/transmission-2.94/a(绝对路径)</span><br></pre></td></tr></table></figure>

<p>git clone下来的需要执行./autogen.sh</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">./autogen.sh --host="arm-none-linux-gnueabi" --prefix=/usr/local --without-gtk --without-systemd  --disable-mac --enable-utp --disable-nls  --enable-utp --enable-lightweight --disable-cli --enable-daemon  PKG_CONFIG="/usr/bin/pkg-config" PKG_CONFIG_PATH="/root/ARM/opt/lib/pkgconfig" </span><br><span class="line"></span><br><span class="line">make CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib" LD="$&#123;cross&#125;ld"</span><br><span class="line">make install DESTDIR=/root/transmission/a(绝对路径)</span><br></pre></td></tr></table></figure>

<p>错误1. 出现No package ‘libevent’ found -&gt;安装libevent</p>
<p>错误2. fatal error: curl/curl.h: No such file or directory -&gt; 安装curl</p>
<p>错误3. rpcimpl.c:16:18: fatal error: zlib.h: No such file or directory -&gt;安装zlib</p>
<p>错误4. fatal error: systemd/sd-daemon.h: No such file or directory -&gt;需要安装systemd, 此处强烈建议使用<code>--without-systemd_daemon</code>选项, 否则编译systemd又是一堆依赖</p>
<h4 id="2-libevent"><a href="#2-libevent" class="headerlink" title="2. libevent"></a>2. libevent</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz</span><br><span class="line">cd libevent-2.0.21-stable</span><br><span class="line">./configure --host="arm-none-linux-gnueabi" --prefix="/root/ARM/opt/"</span><br><span class="line"></span><br><span class="line">make CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib" LD="$&#123;cross&#125;ld"</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<h4 id="3-libcurl"><a href="#3-libcurl" class="headerlink" title="3. libcurl"></a>3. libcurl</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">wget https://curl.haxx.se/download/curl-7.61.1.tar.gz</span><br><span class="line">tar zxvf curl-7.61.1.tar.gz</span><br><span class="line">cd curl-7.61.1</span><br><span class="line">./configure --prefix="/root/ARM/opt/" --target=arm-none-linux-gnueabi --host=arm-none-linux-gnueabi --with-zlib="/root/ARM/opt" --with-ssl="/root/ARM/opt"</span><br><span class="line"></span><br><span class="line">make CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib" LD="$&#123;cross&#125;ld"</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<p>错误1. configure: error: /root/ARM/opt is a bad –with-ssl prefix! -&gt; 安装openssl</p>
<h4 id="4-openssl"><a href="#4-openssl" class="headerlink" title="4. openssl"></a>4. openssl</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">wget https://www.openssl.org/source/openssl-1.1.1.tar.gz</span><br><span class="line">tar zxvf openssl-1.1.1.tar.gz</span><br><span class="line">cd openssl-1.1.1</span><br><span class="line">./Configure linux-generic32 shared  -DL_ENDIAN --prefix=/root/ARM/opt --openssldir=/root/ARM/opt</span><br><span class="line"></span><br><span class="line">make CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib" LD="$&#123;cross&#125;ld" MAKEDEPPROG="$&#123;cross&#125;gcc" PROCESSOR=ARM</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<h4 id="5-zlib"><a href="#5-zlib" class="headerlink" title="5. zlib"></a>5. zlib</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">wget http://zlib.net/zlib-1.2.11.tar.gz</span><br><span class="line">tar zxvf zlib-1.2.11.tar.gz</span><br><span class="line">cd zlib-1.2.11</span><br><span class="line">./configure --prefix="/root/ARM/opt"</span><br><span class="line"></span><br><span class="line">make CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib" LD="$&#123;cross&#125;ld"</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<h3 id="目标平台执行transmission的环境变量-忽略"><a href="#目标平台执行transmission的环境变量-忽略" class="headerlink" title="目标平台执行transmission的环境变量(忽略)"></a>目标平台执行transmission的环境变量(忽略)</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">export PATH=/dev/opt/bin:$PATH</span><br><span class="line">export LD_LIBRARY_PATH=/dev/opt/lib:$LD_LIBRARY_PATH</span><br><span class="line">export CURL_CA_BUNDLE=/mnt/Sync2/ca.crt</span><br><span class="line">export TR_CURL_SSL_CERT=/mnt/Sync2/cert.pem</span><br><span class="line">export TR_CURL_SSL_CERT=/mnt/Sync2/cert.pem</span><br><span class="line">export TR_CURL_SSL_KEY=/mnt/Sync2/key.pem</span><br><span class="line">export STNOUPGRADE=1</span><br></pre></td></tr></table></figure>

<h3 id="TODO-编译systemd"><a href="#TODO-编译systemd" class="headerlink" title="TODO: 编译systemd"></a>TODO: 编译systemd</h3><p>可以参考 <a href="https://wiki.beyondlogic.org/index.php?title=Cross_Compiling_SystemD_for_ARM" target="_blank" rel="noopener">https://wiki.beyondlogic.org/index.php?title=Cross_Compiling_SystemD_for_ARM</a></p>
<h4 id="1-libkmod"><a href="#1-libkmod" class="headerlink" title="1. libkmod"></a>1. libkmod</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">wget https://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-17.tar.gz</span><br><span class="line">./configure --host=arm-none-linux-gnueabi --prefix=/root/ARM/opt/ </span><br><span class="line"></span><br><span class="line">make </span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<h4 id="2-libffi"><a href="#2-libffi" class="headerlink" title="2. libffi"></a>2. libffi</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">wget https://sourceware.org/ftp/libffi/libffi-3.2.1.tar.gz</span><br><span class="line">./configure --prefix=/root/ARM/opt/  CC=arm-none-linux-gnueabi-gcc --host=arm-none-linux-gnueabi   </span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<h4 id="3-pcre"><a href="#3-pcre" class="headerlink" title="3. pcre"></a>3. pcre</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.42.tar.gz</span><br><span class="line">./configure --prefix=/root/ARM/opt/ --host=arm-none-linux-gnueabi   CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib"</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<h4 id="4-libattr"><a href="#4-libattr" class="headerlink" title="4. libattr"></a>4. libattr</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">wget https://download-mirror.savannah.gnu.org/releases/attr/attr-2.4.48.tar.gz</span><br><span class="line">./configure --host=arm-none-linux-gnueabi --prefix=/root/ARM/opt/</span><br><span class="line"></span><br><span class="line">make CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib" LD="$&#123;cross&#125;ld" </span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<h4 id="5-libcap"><a href="#5-libcap" class="headerlink" title="5. libcap"></a>5. libcap</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">wget https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.24.tar.xz </span><br><span class="line">make prefix=/root/ARM/opt/  BUILD_CC=gcc  CC="$&#123;cross&#125;gcc" AR="$&#123;cross&#125;ar" RANLIB="$&#123;cross&#125;ranlib" LD="$&#123;cross&#125;ld"</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>

<p>make不成功修改文件:</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">vi libcap/cap_file.c</span><br><span class="line"></span><br><span class="line"><span class="meta">-#</span><span class="bash">ifdef VFS_CAP_U32</span></span><br><span class="line">+#if defined (VFS_CAP_U32) &amp;&amp; defined (XATTR_NAME_CAPS)</span><br></pre></td></tr></table></figure>

<h4 id="6-glibc-没有成功…"><a href="#6-glibc-没有成功…" class="headerlink" title="6. glibc(没有成功….)"></a>6. glibc(没有成功….)</h4><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">wget http://ftp.gnome.org/pub/gnome/sources/glib/2.52/glib-2.52.3.tar.xz</span><br><span class="line"></span><br><span class="line">export glib_cv_stack_grows=no; \</span><br><span class="line">export glib_cv_uscore=no; \</span><br><span class="line">export ac_cv_func_posix_getpwuid_r=no; \</span><br><span class="line">export ac_cv_func_posix_getgrgid_r=no; \</span><br><span class="line">CFLAGS=-I/root/ARM/opt/include \</span><br><span class="line">LDFLAGS=-L/root/ARM/opt/lib \</span><br><span class="line"></span><br><span class="line"> </span><br><span class="line">./configure --host=arm-none-linux-gnueabi --prefix=/root/ARM/opt/ --disable-libmount</span><br></pre></td></tr></table></figure>


    </div>

    
    
    
        
      
        <div id="reward-container">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作, 一个耿直的笑脸~</div>
  <button id="reward-button" disable="enable" onclick="var qr = document.getElementById(&quot;qr&quot;); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">
        
      
      <div style="display: inline-block">
        <img src="/images/wechatpay.jpg" alt="Levon 微信支付">
        <p>微信支付</p>
      </div>
        
      
      <div style="display: inline-block">
        <img src="/images/alipay.jpg" alt="Levon 支付宝">
        <p>支付宝</p>
      </div>

  </div>
</div>

      

      <footer class="post-footer">
          
            
          
          <div class="post-tags">
            
              <a href="/tags/linux/" rel="tag"># linux</a>
            
              <a href="/tags/arm/" rel="tag"># arm</a>
            
              <a href="/tags/transmission/" rel="tag"># transmission</a>
            
              <a href="/tags/bt/" rel="tag"># bt</a>
            
          </div>
        

        

          <div class="post-nav">
            <div class="post-nav-next post-nav-item">
              
                <a href="/p/a63b0191.html" rel="next" title="arm交叉编译器的区别">
                  <i class="fa fa-chevron-left"></i> arm交叉编译器的区别
                </a>
              
            </div>

            <span class="post-nav-divider"></span>

            <div class="post-nav-prev post-nav-item">
              
                <a href="/p/271bdf2a.html" rel="prev" title="makefile的选项CFLAGS、CPPFLAGS、LDFLAGS和LIBS的区别">
                  makefile的选项CFLAGS、CPPFLAGS、LDFLAGS和LIBS的区别 <i class="fa fa-chevron-right"></i>
                </a>
              
            </div>
          </div>
        
      </footer>
    
  </div>
  
  
  
  </article>

  </div>


          </div>
          
    
    
  <div class="comments" id="comments">
    <div id="disqus_thread">
      <noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript>
    </div>
  </div>
  
  

        </div>
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">
        
        
        
        
      

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#编译平台准备工作"><span class="nav-number">1.</span> <span class="nav-text">编译平台准备工作:</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#目标平台开始编译"><span class="nav-number">2.</span> <span class="nav-text">目标平台开始编译:</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-transmission"><span class="nav-number">2.1.</span> <span class="nav-text">1. transmission</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-libevent"><span class="nav-number">2.2.</span> <span class="nav-text">2. libevent</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-libcurl"><span class="nav-number">2.3.</span> <span class="nav-text">3. libcurl</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-openssl"><span class="nav-number">2.4.</span> <span class="nav-text">4. openssl</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5-zlib"><span class="nav-number">2.5.</span> <span class="nav-text">5. zlib</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#目标平台执行transmission的环境变量-忽略"><span class="nav-number">3.</span> <span class="nav-text">目标平台执行transmission的环境变量(忽略)</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#TODO-编译systemd"><span class="nav-number">4.</span> <span class="nav-text">TODO: 编译systemd</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-libkmod"><span class="nav-number">4.1.</span> <span class="nav-text">1. libkmod</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-libffi"><span class="nav-number">4.2.</span> <span class="nav-text">2. libffi</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-pcre"><span class="nav-number">4.3.</span> <span class="nav-text">3. pcre</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-libattr"><span class="nav-number">4.4.</span> <span class="nav-text">4. libattr</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5-libcap"><span class="nav-number">4.5.</span> <span class="nav-text">5. libcap</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#6-glibc-没有成功…"><span class="nav-number">4.6.</span> <span class="nav-text">6. glibc(没有成功….)</span></a></li></ol></li></ol></div>
        
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image"
      src="/images/avatar.jpg"
      alt="Levon">
  <p class="site-author-name" itemprop="name">Levon</p>
  <div class="site-description" itemprop="description">Never Give Up</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        
          <a href="/archives/">
        
          <span class="site-state-item-count">127</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-categories">
        
          
            <a href="/categories/">
          
        
        <span class="site-state-item-count">34</span>
        <span class="site-state-item-name">分类</span>
        </a>
      </div>
    
      
      
      <div class="site-state-item site-state-tags">
        
          
            <a href="/tags/">
          
        
        <span class="site-state-item-count">76</span>
        <span class="site-state-item-name">标签</span>
        </a>
      </div>
    
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://github.com/unix2dos" title="GitHub &rarr; https://github.com/unix2dos" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i>GitHub</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="mailto:levonfly@gmail.com" title="E-Mail &rarr; mailto:levonfly@gmail.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i>E-Mail</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://twitter.com/levonfly" title="Twitter &rarr; https://twitter.com/levonfly" rel="noopener" target="_blank"><i class="fa fa-fw fa-twitter"></i>Twitter</a>
      </span>
    
      <span class="links-of-author-item">
      
      
        
      
      
        
      
        <a href="https://weibo.com/l6241425" title="Weibo &rarr; https://weibo.com/l6241425" rel="noopener" target="_blank"><i class="fa fa-fw fa-weibo"></i>Weibo</a>
      </span>
    
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Levon</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-area-chart"></i>
    </span>
    <span title="站点总字数">507k</span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
    <span title="站点阅读时长">7:41</span>
</div>

        












        
      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js?v=3.1.0"></script>
  <script src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  <script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script src="/js/utils.js?v=7.4.0"></script><script src="/js/motion.js?v=7.4.0"></script>
<script src="/js/schemes/pisces.js?v=7.4.0"></script>

<script src="/js/next-boot.js?v=7.4.0"></script>



  
  <script>
    (function(){
      var bp = document.createElement('script');
      var curProtocol = window.location.protocol.split(':')[0];
      bp.src = (curProtocol === 'https') ? 'https://zz.bdstatic.com/linksubmit/push.js' : 'http://push.zhanzhang.baidu.com/push.js';
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(bp, s);
    })();
  </script>








  <script src="/js/local-search.js?v=7.4.0"></script>














  

  

  

<script>
  function loadCount() {
    var d = document, s = d.createElement('script');
    s.src = 'https://levonfly.disqus.com/count.js';
    s.id = 'dsq-count-scr';
    (d.head || d.body).appendChild(s);
  }
  // defer loading until the whole page loading is completed
  window.addEventListener('load', loadCount, false);
</script>
<script>
  function disqus_config() {
    this.page.url = "https://unix2dos.github.io/p/73da9612.html";
    this.page.identifier = "p/73da9612.html";
    this.page.title = '交叉编译arm-transmission-2.94';};
  function loadComments() {
    if (window.DISQUS) {
      DISQUS.reset({
        reload: true,
        config: disqus_config
      });
    } else {
      var d = document, s = d.createElement('script');
      s.src = 'https://levonfly.disqus.com/embed.js';
      s.setAttribute('data-timestamp', '' + +new Date());
      (d.head || d.body).appendChild(s);
    }
  }
    window.addEventListener('load', loadComments, false);
  
</script>

</body>
</html>
